<template>
  <div class="img-list">
    <img
      v-for="img in imgList"
      :key="img.id"
      :src="img"
      class="img-item"
    >
  </div>
</template>
<script setup>
import {useRoute} from 'vue-router'
import {ref} from 'vue'
import http from '@u/request.js'
import URLS from '@api/api'
import {resultHandle} from '@/common/common'
const imgList = ref([])



const route = useRoute()

const {uuId} = route.query
http.post(URLS.PDF_QUERY_BY_UUID,{uuId}).then(res=>{
    resultHandle(res,()=>{
        const {docId,groupId} = res.data
        const docIds = docId.split(';')
        const groupIds = groupId.split(';')
        imgList.value = docIds.map((item,index)=>`${location.origin}/${groupIds[index]}/${item}`)
    })
})
</script>

<style lang="scss" scoped>

.img-item{
    max-width:95vw;
    margin:5vw auto;
    display:block
}

</style>